import React from 'react';

const LightAnalysis = ({ brightness }) => {
  let suggestion = '';
  if (brightness < 50) {
    suggestion = '光线严重不足，建议补光灯亮度调至 100%，角度 30 度，距离 0.5 米';
  } else if (brightness < 100) {
    suggestion = '光线不足，建议补光灯亮度调至 80%，角度 45 度，距离 1 米';
  } else if (brightness < 150) {
    suggestion = '光线适中，建议补光灯亮度调至 50%，角度 60 度，距离 1.5 米';
  } else {
    suggestion = '光线充足，无需额外补光';
  }

  return (
    <div style={{ marginTop: '20px' }}>
      <h3>补光建议</h3>
      <p>{suggestion}</p>
    </div>
  );
};

export default LightAnalysis;